﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using Hybrid;

namespace Hybrid
{
    class Bitmaps
    {
        //private List<Image> Projectile = new List<Image>();
        private List<List<Image>> privatePlayerShipBitmap = new List<List<Image>>();
        private List<List<Image>> privateEnemyBitmap = new List<List<Image>>();
        private List<List<Image>> privateProjectileBitmap = new List<List<Image>>();
        private List<List<Image>> privatePowerUpBitmap = new List<List<Image>>();

        public Bitmaps()
        {
            for (int i = 1; i <= 5; i++)
            {
                List<Image> PowerUp = new List<Image>();
                for (int f = 1; f <= 1; f++)
                {
                    PowerUp.Add(Image.FromFile(Application.StartupPath + "\\Images\\PowerUps\\PowerUp" + i + "\\powerup" + i + "_" + f + ".png"));
                }
                privatePowerUpBitmap.Add(PowerUp);
            }
            for (int i = 1; i <= 4; i++)
            {
                List<Image> Enemy = new List<Image>(); 
                for (int f = 1; f <= 4; f++)
                {
                    Enemy.Add(Image.FromFile(Application.StartupPath + "\\Images\\Enemies\\Enemy" + i + "\\enemy" + i + "_" + f + ".png"));
                }
                privateEnemyBitmap.Add(Enemy);
            }
            for (int i = 1; i <= 3; i++)
            {
                List<Image> PlayerShip = new List<Image>();
                for (int f = 1; f <= 4; f++)
                {
                    PlayerShip.Add(Image.FromFile(Application.StartupPath + "\\Images\\PlayerShips\\Ship" + i + "\\ship" + i + "_" + f + ".png"));
                }
                privatePlayerShipBitmap.Add(PlayerShip);
            }
            for (int i = 1; i <= 2; i++)
            {
                List<Image> Projectile = new List<Image>();
                for (int f = 1; f <= 3; f++)
                {
                    Projectile.Add(Image.FromFile(Application.StartupPath + "\\Images\\Projectiles\\Projectile" + i + "\\projectile" + i + "_" + f + ".png"));
                }
                privateProjectileBitmap.Add(Projectile);
            }
        }

        public List<Image> ShipBitmap(int CollectionIndex)
        {
            return privatePlayerShipBitmap[CollectionIndex];
        }

        public List<Image> EnemyBitmap(int i)
        {
            return privateEnemyBitmap[i];
        }

        public List<Image> PowerUpBitmap(int i)
        {
            return privatePowerUpBitmap[i];
        }

        public int EnemyCount
        {
            get
            {
                return privateEnemyBitmap.Count;
            }
        }

        public List<Image> ProjectileBitmap(int i)
        {
            return privateProjectileBitmap[i];
        }
    }
}

